import request from '@/utils/request'

// 查询收款账户
export function getAccountInfo(query) {
  return request({
    url: '/payeeAcctController/getAccountInfo',
    method: 'get',
    params: query
  })
}

// 校验重复
export function checkRepeat(query) {
  return request({
    url: '/payeeAcctController/checkRepeat',
    method: 'get',
    params: query
  })
}

// 新增收款账户
export function saveAccount(data) {
  return request({
    url: '/payeeAcctController/saveAccount',
    method: 'post',
    data
  })
}

// 修改收款账户
export function updateAccount(data) {
  return request({
    url: '/payeeAcctController/updateAccount',
    method: 'post',
    data
  })
}

// 删除收款账户
export function deleteAccount(data) {
  return request({
    url: '/payeeAcctController/deleteAccount',
    method: 'post',
    data
  })
}
// 收款户导入
export function outPutPayeeReportList(query) {
  return request({
    url: '/payeeAcctController/outPutPayeeReportList',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}
// 收款户导入
export function payeeImport(data) {
  const config = {
    'Content-Type': 'mutipart/form-data;boundary=' + new Date().getTime()
  }
  return request({
    url: '/payeeAcctController/payeeImportSalaryReportList',
    type: 'upload',
    method: 'post',
    data,
    config
  })
}